package com.yanqu.road.entity.activity.soulbone;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

@FieldTypeAnnotation(tableName = "t_u_soul_bone_user_data")
public class SoulBoneUserData extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "玩家ID", select = true, update = true)
    private long userId;

    @FieldTypeAnnotation(desc = "总抽数")
    private int totalDrawTimes;

    @FieldTypeAnnotation(desc = "当前抽数")
    private int drawTimes;

    @FieldTypeAnnotation(desc = "六星抽数")
    private int sixTimes;

    @FieldTypeAnnotation(desc = "具宝")
    private String juBao = "";

    @FieldTypeAnnotation(desc = "积分")
    private long score;

    @FieldTypeAnnotation(desc = "当前已经抽到的物品(包括6、7星)")
    private Map<Integer, Integer> getItemMap = new HashMap<>();

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public int getTotalDrawTimes() {
        return totalDrawTimes;
    }

    public void setTotalDrawTimes(int totalDrawTimes) {
        if(this.totalDrawTimes != totalDrawTimes) {
            this.totalDrawTimes = totalDrawTimes;
            setUpdateOption();
        }
    }

    public int getDrawTimes() {
        return drawTimes;
    }

    public void setDrawTimes(int drawTimes) {
        if(this.drawTimes != drawTimes) {
            this.drawTimes = drawTimes;
            setUpdateOption();
        }
    }

    public int getSixTimes() {
        return sixTimes;
    }

    public void setSixTimes(int sixTimes) {
        if(this.sixTimes != sixTimes) {
            this.sixTimes = sixTimes;
            setUpdateOption();
        }
    }

    public String getJuBao() {
        return juBao;
    }

    public void setJuBao(String juBao) {
        if(!Objects.equals(this.juBao, juBao)) {
            this.juBao = juBao;
            setUpdateOption();
        }
    }

    public long getScore() {
        return score;
    }

    public void setScore(long score) {
        if(this.score != score) {
            this.score = score;
            setUpdateOption();
        }
    }

    public Map<Integer, Integer> getGetItemMap() {
        return getItemMap;
    }

    public void setGetItemMap(Map<Integer, Integer> getItemMap) {
        this.getItemMap = getItemMap;
    }
}
